package database;

/**
 * Defines the cuts for each part of a puzzle piece
 * the location of this piece is in relation to the center of the side
 * so when the display methode is called a location is provided of the piece
 * is provided and the color is given
 *
 * @author jimmy
 *
 */

import javax.media.opengl.*;

public abstract class PuzzleCut {

	boolean inverted;

	/**
	 * tells the piece to be opposite of what it is right now
	 * there will be one of each type
	 *
	 */
	public void invert()
	{
		if(inverted)
		{
			inverted = false;
		}
		else
		{
			inverted = true;
		}
	}
	/**
	 * the color of the piece and the background color have to be specified,
	 * the piece will know which one to use by the way it was setup.
	 * @param gl
	 * @param color
	 * @param backColor
	 * @param Coordinate
	 */
	abstract void display(GL gl,PuzzleColor color,PuzzleColor backColor,Coordinate coord,Coordinate location,int direction);
	/**
	 * a clone method that clones the same shape in a different spot
	 * @param invert
	 * @return
	 */
	abstract PuzzleCut clone(boolean invert);
}
